/*
	1、使用原生js
	2、使用JQuery
*/
window.onload = function(){
	init(); // 初始化程序
}
var init = function(){
	// 多种登录方式
	open_mode();
}
var open_mode = function(){
	var ways = document.getElementById("login_open_mode");
	ways.onclick = function(event){
		event = event || window.event;
		var ul = document.getElementsByClassName("login_way_ul")[0];
		if(ul.style.height){
			if(ul.style.height == "auto"){
				ul.style.height = "18px";
				event.target.style.background = "url('./images/login-bg-common.png') no-repeat";
			}else if(ul.style.height == "18px"){
				ul.style.height = "auto";
				event.target.style.background = "url('./images/login-bg-common.png') no-repeat 0 -25px";
			}
		}else{
			ul.style.height = "auto";
			event.target.style.background = "url('./images/login-bg-common.png') no-repeat 0 -25px";
		}
	}
}

// 获取样式值【兼容IE、火狐、谷歌】
/*
currentStyle IE
getComputedStyle 火狐 谷歌
*/
var getStyle = function(obj, name){
	return (obj.currentStyle||getComputedStyle(obj,false))[name];
}